package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.ObjectQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface EmployeeMapper {
    void insert(Employee employee);

    void deleteByPrimaryKey(Long id);

    void updateByPrimaryKey(Employee employee);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int queryForCount(ObjectQuery qo);

    List<Employee> queryForList(ObjectQuery qo);

    void batchDelete(Long[] ids);

    void saveEmployeeRoleRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);


    void deleteEmployeeRoleRelationByEmployee(Long id);

    Employee selectUsernamePassword(@Param("username") String username, @Param("password") String password);

    Employee selectUsername(String username);

    Set<String> selectPermissionsByEmployeeId(Long id);

    void changState(Long id);

    void changePassword(@Param("empId") Long id, @Param("newPassword") String newOne);

    void uploadHeadImg(@Param("src") String src , @Param("empId") Long empId);
    /** 
     * @Description: 保存图片路径
     * @Param: [location]
     * @return: void
     */

    Map<Object,Object> getImgSrc(Long id);
    /**
     * @Description: 查询图片路径
     * @Param: [id]
     * @return: java.util.Map<java.lang.Object,java.lang.Object>
     */

    void deleteImgPath(Long id);
    /**
     * @Description: 删除图片路径
     * @Param: [id]
     * @return: void
     */
}
